
public class StringPlay {
/**

The following are Words :
"ab",  "ab."

The following are not Words :
"ab..", "a.b", ".ab", "a.b.", "a2b.", "."

 * @param args
 */

	public static void main(String[] args) {
		
		String str = "mymy 2mobile. is  nokia n73. its a very cool handset... a.b.c.d. .xf";
		
		// break with space or
		//  token containing > 1 '.'
		//	token containing digits ex n73
		//  token begings with '.'
//		String [] s = str.split("[\\.]+[a-z]+[\\s]*");
//		String [] s = str.split("(\\s*[\\.]*[a-z]+[\\.]+[a-z]+[\\.]*\\s*)+");
		
		String [] s = str.split("[\\s]*[a-z]*[0-9]+[a-z]*[\\.]*[\\s]*|[\\s]+[a-z]*[\\.]{3,}[\\s]*|(\\s*[\\.]*[a-z]+[\\.]+[a-z]+[\\.]*\\s*)+|[\\.]+[a-z]+[\\s]*|\\s+");
		
		
		
		for (int i = 0; i < s.length; i++) {
			System.out.println(s[i]);
			
		}
		System.out.println();
	}
}
